﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace LanguageFeatures.Models
{
    public class Product
    {
        public string Name { get; set; }
        public string? Category { get; set; } = "Watersports";
        public decimal? Price { get; set; }
        public Product Related { get; set; }
        public bool InStock { get; } = true;

        public static Product[] GetProducts()
        {
            var p1 = new Product { Name = "Kayak", Price = 275M, Category = "Water Craft"};
            var p2 = new Product { Name = "Lifejacket", Price = 48.95M, Related = p1 };

            return new Product[] { p1, p2 };
        }
    }
}
